Responsive Web Design, 2e by Ethan Marcotte

Responsive Web Design, 2e by Ethan Marcotte

Author:Ethan Marcotte
Language: eng
Format: epub
Tags: COMPUTERS / Web / Design
Publisher: A Book Apart
Published: 2014-11-25T05:00:00+00:00


A room with a viewport

We’ve already identified a number of stress points in our design. But before we start applying our media queries, we need to make one final tweak to our markup.

When Apple launched the iPhone in 2007, they created a new attribute value for Mobile Safari’s meta element: ­viewport (http://bkaprt.com/rwd2/31/). Why? Well, the dimensions of the iPhone’s display is 320×480, but Mobile Safari actually displays web pages at a width of 980 pixels. If you’ve ever visited Apple’s homepage (http://apple.com/) on a WebKit-enabled phone (FIG 4.9), then you’ve seen this behavior in action: Mobile Safari is drawing the page upon a 980px-wide canvas, and then shrinking it to fit within your phone’s 320×480 display.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.